inline GreatInt::GreatInt()
	:m_isPositive(true)
{
}

inline GreatInt::GreatInt(const char* i_string)
{
	Assign(i_string);
}

inline GreatInt::GreatInt(const int i_num)
{
	Assign(i_num);
}

inline GreatInt::GreatInt(const GreatUInt& i_uint, const bool i_sign)
	:m_isPositive(i_sign)
	,m_magnitude(i_uint)
{
}

inline const GreatInt& GreatInt::Assign(const char* /*i_string*/)
{
	//TODO
	return *this;
}

inline const GreatInt& GreatInt::Assign(const int i_num)
{
	m_isPositive = i_num >= 0;
	m_magnitude.Assign(abs(i_num));
	return *this;
}

inline const GreatInt& GreatInt::operator+=(const GreatInt& /*i_that*/)
{
	//TODO
	return *this;
}

inline const GreatInt& GreatInt::operator+=(const int /*i_num*/)
{
	//TODO
	return *this;
}

inline const GreatInt& GreatInt::operator*=(const GreatInt& i_that)
{
	m_isPositive = (m_isPositive==i_that.m_isPositive);
	m_magnitude *= i_that.m_magnitude;
	return *this;
}

inline const GreatInt& GreatInt::operator*=(const int i_factor)
{
	m_isPositive = (m_isPositive==(i_factor>=0));
	m_magnitude *= abs(i_factor);
	return *this;
}

inline const GreatInt& GreatInt::doexp(const UInt exp)
{
	m_isPositive = (m_isPositive || ((exp|1)==0));
	m_magnitude.ApplyExp(exp);
	return *this;
}

inline const GreatUInt& GreatInt::Abs() const
{
	return m_magnitude;
}

inline bool GreatInt::IsPositive() const
{
	return m_isPositive && !m_magnitude.IsZero();
}
